moving some of the php stuff around