add index for go, reorg things a bit