Move function to function file.