reorganized Peer code