refactor to use new design