implemented pipeline pattern