optimise checking new_path totals instead of path
optimise checking new_path totals instead of path