writing the simple example on main.js