added method to create relation to use as index