Added FgetIndex function