tidy up the relations