close button working according the more complex requirements that I just found out today