Passing to C - done. Needs testing