added better thread safty ... still broke