complete ex2.41
add enumerate-interval