made ub_test more robust