DP29, CODE, solution needs some cleanup