added wireing for gateway