added some stuff from phi