update peernet engine and add loop