fixed tests and implemented testGetStructure