more refactors