added local copy of animate, sanitize