added legend to index table