Refactored create full rows function