add lock procedure when state is expanded