moved getConnection to public