edits to modern php