updated readme and fixed a bug