added some comment changes to give understanding to how the c functions work