added php functionality