extract next and previous to make them smarter