Trust Model for P2P Networks