added a main method to create a peer