lab7 cells logic