add function(divide) to main.js

Again, I ask you for a check