Added basic calc function