refactor a bit and start using aoc JSON