make protocol works with connection