refactor
logic for desktops