added functions to test exceptions and collections (hashmaps and lists)