added a method for finding a next solution
moved some stuff from solution to translator