tui and playercontroller rewritten