extract to utils