Added page slider function