copying complete, still segfaults
switched from vector to map, got rid of destructors, got rid of segfaults