updating scale fn