rel/alternate parsing

added function parse_rels to parse rels and alternates. fixes #6