improving next/prev