Added parameter for specifying tempcontactwindow