Divide critical sections into smaller block

for performance