further updates to the modindices() function