Added new test case, moved check for return statement outside of test cases