Make crit region code real functions. non-optimized