refactor scene switching