peername test bug fixed and tested
snapshot helper