added .hug supporrt in fun.py