Decided to use same variables names as MATLAB to help TTD