Added loopback support