add calculator logic