finished translation MATLAB --> R,C ; start debugging...