added cycle functionality to photos