added -window, -w, -h arguments