refactor error message
replace hard-coded message with errormessage factory output