improved backtrack efficiency, added color to UI