refactoring by YUI3