In this work we introduce a construction and analysis of network codes for two sources. The region of achievable rates for this problem is still unknown. The scheme we suggest is based on modifying the multicommodity flow solution and thus improving the achievable rate region, w.r.t the uncoded case. The similarity to the flow problem allows our method to be implemented distributively. We show how the construction algorithm can be combined with distributed backpressure routing algorithms for wireless ad-hoc networks. For both the nondistributed case and the distributed case, the computational complexity of our algorithm for network coding is comparable to that of the parallel multicommodity flow problem. We provide non trivial upper and lower bounds on the performance of our scheme, using random coding techniques.