fixing some concurrency issues and added dsampling