adding previous and next when looking at images