starting to refactor case design