Update main.js

adding the beginnings of the usetool function