implemented f1 measure