add tests for error cases