adding inputLength() method to connection class