Added functions to connect to redshift