move logic from router to window_tiler