Completed PROT solution.