I'm not sure if it is proper to introduce Y here, since it is a reference to global YUI class and not its instance (add is a static function of YUI). So I would rather directly call YUI.add on line 5.