moved protocol into own package, added testing