added window mode