tidy up dsl build method