added dirty rect drawing