refactored the error messages to use error message template
added delete and update test cases