even more refactor