modularizing functions in analise.py