introduce enumerator to do pagination