updates README and adds input validation