added functions to program file