refactor even more