latest working code for PSL without sentiment