add MODE flag coalescing