Trying to make a library for protocols