Updated the functions file