updated version with optional data views and better zoom handling