working version of pages slider