move some code to utils module