added is_locked feature