more refactor