refactor

add def-widget build-widget and others