Rewrite animate function in lace