utility function with possible don't care