Add addToWindow method