initial implementation
modified error messages so tests pass again