Refactor basic calc