first commit in recurse branch. 12/10/14. added flagged and number