implement connect
implemtnt persist connect