added get_types method