can we invert this to have only one return statement?