Code for part 5, copy to part 6, add ball image