rename and using toerr