take advantage of wait and notify methods