nit: this if needs braces