basic structure/ supporting functions
changed file to c
Converted to c