abstract out protocol a little bit