added error messages to all edit functions