added time limit for photo viewer