updated README and error checking