added desktop mananger and refactor