defined MAX_TIMEOUT and DEFAULT_TIMEOUT