edited main.js to add variable c abstraction