more refactor work