Extracting up as a function file