added php functions