- convert to critical sections