Add calculate method