actually return error code