refactor convertion from screen to surface