change layout of index
change logic to select complex