Added a utility function