polish code, set status