work on errno, unfinished