adding dispose pattern