added zoom in/out steps, improved code