started adding automatic relation detection