code cleanup before submission