check the return value