moved window functions into separate include file