added relationships between stages