Changed prime numbers collection to HashSet