trying to create a valid error and exception handling