Dynamic programming

Change initialization