refactor error handling with finally statement
add newlines to the tests
change test labels