Working version; change structure