minor reafactoring