update scaling logic