added model relationships and tests