Final Version with comments