minor rerefactoring