add index to statements