Final Solution with comments