window working with delay