refractoring by adding methods