separated p2p and the processes via multiple inheritance