new generalized function for FF extraction