indices added to compile function