Added sample indexing