unneeded creation of local, it is enough to return the result of the if