added new function for updating the available tags array