next and prev button now work