moved function to utility need to call it from somewhere