adding changes in c code in branch