nit: should we do `else if {` to reduce the indentation ?