finished implementing timeouts