Added calculate method, fixed naming bug causing wrong return values