improve window type computing