the alliance with valdemar was settled when richeza gave him his daughter sophia in marriage