changes to heuristic to asign boxes on goal to their respective goal