Updated indexer to take parameters
Added index operation and implemented index