move sleep in UDP handlers to threads