Changed calculator implementation