converted grab_data to get its info from command line arguments and output to stdout