add option to get score column
fix offset bug when writing states intervals