implements navigation buttons logic.
implements pagination button lagic