found the bug - need to pass in index here