refactors on OOD principles