fix part 2. still need more tests