begin
some net code copy from book