refactored populateCells method arguments