add timeout, cleanup