tentative C code added