reimplement dp_algorithm for DataTagged, existing implementation was complete rubbish (ich bin so beschämt!)