pre-tested sample_wtatage function

needs to test with the fill in function