delete r3 register
write a mutex code