correct DP algo. that passed the OL