Implement the next and prev buttons