Included return statements where appropriate