added some comments after review