modified for private networking slightly