fix unmarshaling of relations
add convenience method to filter relations by type