additional test coverage and error handling