added relationships
bug fixed