added window-move and slight modifications