Update tools.js

added addCandidate and removeCandidate feature