tested out window function well