move helper function to utils module, update docs