fix some mis understandig of functions variables