improved naming and usage of errors