starting to add error handling