add locked() closes #1