refactor to use component build