implemented part 3