gen refactoring lib from lookio/eaws