modified function file