test setup fixed and made more reliable