add lock guard