add scale change function