switched from wget to curl; cleaned up the output