added window functionality