ww - added some comments to organize