one more refactor