A small nit, but I believe the preferred style is
} else {