Util function.