Added an utility function.