Final version of code
Final code