refactoring: create builder and listen library