added single socket support