fixed window retrieval code