added PHP functions