WIP separate out protocol implementation