add lock detection
move function
remove comment