ugly bodging of structs. Will have to do for now