rename retvals to errnos