experimenting in c codegen -- some bug fix