Complete rewrite; using DRPC;