added comments to algorithm backtracking