simplified zoomtobounds function