first working variant with improved cells list
some cleanups