Update command I and D to pass by reference. Tested and working.