implement autozoom (Closes #8)