Added experimental code to enable adhoc support