added base eventreg.js