Implemented Connect and Listen