Measuring function
New window blocking logic