minor optimization

removed multiple return statements