Better row creation function