keeping a version of problem457 before i convert it back
solved problem 240!