added condition for photo date