moving call to leg.setup() to avoid having log output show in unit tests