add scalaPipes3 which uses index