Working pp6calculator code