implemented scaling, code review