private functions added to export
 basic query function for occurrences and collections finished