still writing findNext function