move some data structures to data types