Sketch dynamically-resizable DPD implementation (broken)