add copy paste and some analize ext function code