implemented better autozoom