refactored to reuse code. 
added blocking to insert forwardingrule to prevent race error