db working across settimeouts