add f_score function, not verified