Added widen window function