Added a utlity fnctions file for refactorization