Refactoring code added