moving some more utils functions