fix bugs and add segword modul