test for window directive added. should be written before code :-(