nit: space after if, also please put the this.peer... onto a new line.