error handling procedure improved for variable naming to be moer
specific to meaning