fixed some bugs and updated readme