refactoring to a cleaner code
refactoring to a cleaner code