beautify code
move selectCall() inside domAction module
avoid the use of global variable