fix bugs of sort
impl pop up
fix initWords
add new tests