Network Coding in Relay Networks