Added draw_window function