use static member instead of global variable for f_eval