forgot the global variable for database method