formatting
use single global *window* variable