refactor scale class, fails 2 tests, needs fix