updated to connect to live database