Added a utility function.