added wait and notify on update thread