added testConnection functionality