adjusted serializer to only use internally defined types;