reworked php and moved it around