added indices to plotting call