updated dynamic connectivity app to have variable rectangle width and height dependant on canvas dimensions