add utils function and use it