Modified to use master database config