extracted animation handler from cellfactory