calculate method changed