fromscratch - > dp