cleaned up protocol