make it thread Safe