sending data from c into chuck now works, but lots of cleanup and improvement left to do