move some lines from c to unix