rewrite with CALayer and CAAnimation