refactor models & structs