Indexing enhanced and issues fixed

Indexing done with whole function signature