added logic for photo events