changed how setup.sh works, made it more general and useful