added functions file
Some basic functions