update get terms to return indexed array