refactoring process (to object oriented)