updated to new connect method