Introduced differentiation based on protocol in order to select correct libray