add specification for multi thread safty