making next and previous text public