advanced functions adv_func.py