added typing code to index, not currently working