Partial solution.. backtrack does not work