use window instad of rectangle
update snippet