fix for loops
use mongourl instead of details things