wiring the js and views together