apply return code