design refactor