detect inverse mode