full code of my Thesis Project