better way to get database name;