build base connection