add function,call and adapt var