improved scalize(): now poolSize is calculated before the for loop and not inside it, added new javadocs and comments