Changing connection to new connect() syntax