working IE logic