removing next and prev