better network handling