add add_noise.py and bug fixes in F1.py