wait notify and some stuff