For review

I think you have too many return statements, a function should really have a maximum of 2