Added read method and params as cmdline arguments to this code