updated the README and fixed some bugs