nit: put else on the same line as the closing brace