refined the structure (not tested yet)