start work on design and refactor code