figured out how to do proper sampling