changed error to string