put in amplitude scaling functions and unit test