Create functions.py

funtions used by main program