Updated code/Included more comments