added some php functionality