finished pipeline implementation