Added Next and Previous Button Logic