modified major parts and removed the old ld_down