got working output for HW3, F1 = 0.190527256479