First implementation for DCP, very buggy, needs recheck.