cell logic added