Added calculate method