formatting nit: should be "} else" on one line.