updated the melogit.r file with debugging code