finalyzing the code after testing