Please use spaces as delimiter for all binary operators. Put space before opened `{`, if on the same line.

Instead of this:
    
    if(connections.count()==1){

Prefer this:

    if(connections.count() == 1) {

(3 spaces added)