task 3: code cleanup