relations refactory