Solution for consensus problem
Add test for consenus