Added index function to Tokens class