added window functions