finding consecutive numbers in a given list