refactor to use simple DSL