add error handling for user