some return code simplification