added function for existence an glossary.
Added tests too.