almost working part2 code wheeeeeeeee