got to x23 in input2.json
can handle all input2.json
commented code, took out debuging info