test for event.js test added
further minoer refractoring