calculator impl.