make wait notify optional