Refactoring the code using Design pattern with good coding practice