implement relationship data and functions as attributes