code cleanup