use wait notify to smooth redraw?