solved my first DP problem!