Separated the getCells function for use later
Merged