add function(change) to main.js

Again, I ask you for a check