Partially implemented solution.