refactor solution structure