tests added, passes all tests, pipeline function added