add utility function