better check for db