reorganizing in OO approach