some basic cell logic