corrected method getConnection().