added functions in DOM module createEvent and dispatch