updated main and timeout