working on recursive function of lia.py