add new scale function
add test for scale function