changed zooming to a relative algorithm