implemented next prev nav buttons