Mostly done
using critical