finalized project, added C code to repository. Comments and revision soon
final version, added c code. comments needed.