yy refactor