update onchange function to delete expired beamtags