normalize the structure