changed error handling/messages