improved index creation

used a smarter way of updating PA table when in chunking mode