fixed ordering
simplified unit test
setrelation instead of createrelation