added more comments in the code example