modified build_and_test