animation functions when cached