better modes detection