refactor pipe implementation with score trigger