window class fully implemented