Started code for handling relationships