research func bug fix, and some improvement