added photo-gate example