Added new way of determining protocol