got nested relations working, but gross code to do it