nit: can use a single-line if