move private utility functions to Mojo::Util