reformat some stuff
explicitly handle timeouts - code very stable