reorganize cleverscript call code