began framework for window functions