updated new version with many small changes and zoom implementation