Changed structure, added test