Added index functionality