prepare connect