deport genric func to utils