completed part 4, sans user interaction