packet c code done