handle protocols