Added index and ouput