refactor all structs