updated README and checked input edge case