solving some concurrency problems and high rate race conditions