Added previous code

Prototype only, will convert to Linux C