add functions in dispatcher.js