adjust extend code, by diwen
adjust extend code, by diwen