DP

took out find_max()
define all parameters