getting rows to print