revise calculation