Added peg contact code