added function pandigitals and small upgrades