added var i back in so table has 4 columns per row