print with index