fixed possible typing error and enumerate