much clearer pipeline implementation