updated ideal api code to use [] for index lookups