how did aqueducts work