gen index and list