Updated file with fuctions