updated sample_wtatage and redocumented