Updated connection.java