first pass at solution to part 1