added pure python photon class