added f score function