refactor build()