fix the 'first 2 characters issue'
use only one program for both train and predict
refactoring