improve zoom and refactoring