code cleanup p1