refactor startx