add filter to alter closing of main element