refactoring : initial cut