added invalidate method