two version for plsa implementation