various improvements

use iloc for indexing
use enumerate for ordered list