nit: please use `} else {`.