qualify as_index in function to avoid ambiguity
missing ind2sub includes