created a utils.js file for code reusability