added some fancy php stuff