adjust timeout based on #trees