parsed types into data structures and added print method