continued working on cleaning up sampling class.