removed compile index because its beyond fixing. rewrite later