more rfactoring