implementing connect