made a lot of changes, doing the php now