moved binding boilerplate
moved code to main.js