updated to close previous window before opening new window

applied new images