added tests for the not-so-happy paths