properly check duplicate and late messages in locking and unlocking. tests 1-8 pass