change net connect method to class method