added useful php functions