added previous and next functions
added simple pref and next buttons