some refactoring: introduce Scaler for zoom control