removed most unnecessary return statements