Adding create_lock method