Debugged. gibbs cpp code working now.