Updated code with utility function call