write to current window method