remove duplicated code and rework algorithms to end up with smaller code
1 file changed