PLS implementation