only one return is better than two as mentioned in comment