#15 fixes endpoint issue

Is now able to determine while protocol to use with the endpoint