implement cleaner method to get both the index and the value of items in an array
select pkgs