got some improvements in structure