added functions to functions file