fixed very stupid bug of having two loops that estimate uf, vf.

I suggest to combine both loops into a single loop. removed one   ``end`` and one `` for `` statement