moved check connection back to form controller