make deploy slightly more general