use total to calculate continously