cleaned up connection.rb