some changes but tui::update() still doesn't work