some front-end work & model for lda code