solution most of the way there