working Protocol class with tests