optimize float window