add lock code