began coding PDM (incomplete)