code cleanup v3