add index building prototype