Refactoring code
Update