animate code snippet