simplified a return statement
removed a few unnecessary lines