added a code to initial max windows