updated function file