added a where arg to output functions so HTML can use diff windows