refactor the structures.