added relationships and basic validations