fixed logic error in pidigits, doesn't print the last value twice anymore