Separate creation of row into its own function