Added utility function. Updated README.