rewrote zoom to have early returns for sake of readability