added documentation

added documentation to main.js #57