error free and draws a window