removing dependency on prototype.js