add PeerWindow
update threshold
add Window Struct