Jeff wanted me to change the error numbers to error strings
I changed the name of the function so it can be used as module