put helper functions to utils