got the next and prev buttons working