converting to data structures