implemented part 1