added a bunch of php functions, will need much more