refactoring to new utilities js file
Refactoring utilities