add a lock on init
add lock